<?php

function check_action_role($func) {
	$CI =& get_instance();
	$currUser = $CI->session->userdata('currUser');
	$role = $currUser['role'];
	if ($role == 3)
		return true;
	else if ($role == 1)
		return false;
	else if ($role == 2)
		return in_array($func, $config['check_role']);
	return false;
}

?>
